/**
 * Copyright (c) 2025 myons Inc. All rights reserved.
 */
package cn.zmwh.manage.admin.modules.sync;

import cn.zmwh.manage.admin.modules.upms.pojo.entity.SysUser;
import com.gitee.Jmysy.binlog4j.core.BinlogEvent;
import com.gitee.Jmysy.binlog4j.core.IBinlogEventHandler;
import lombok.extern.slf4j.Slf4j;

/**
 * @describe: 商品同步 、
 * @author: dmzmwh 、
 * @time: 2025-03-29 16:20 、
 */
@Slf4j
public class ProductBinlogEventHandler implements IBinlogEventHandler<SysUser> {

    @Override
    public void onInsert(BinlogEvent<SysUser> binlogEvent) {
        log.info("onInsert:{}", binlogEvent.getData());
    }

    @Override
    public void onUpdate(BinlogEvent<SysUser> binlogEvent) {
        log.info("onUpdate:{}", binlogEvent.getData());

    }

    @Override
    public void onDelete(BinlogEvent<SysUser> binlogEvent) {
        log.info("onDelete:{}", binlogEvent.getData());
    }

    @Override
    public boolean isHandle(String s, String s1) {
        if (s.equals("bs_k") && s1.equals("sys_user")) {
            return true;
        }
        return false;
    }
}
